-
Notifications
You must be signed in to change notification settings - Fork 39
feat: add script to generate preview gifs and add them to the README #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,94 @@ | |||
#!/bin/bash | |||
|
|||
CONFIG_FILE="$HOME/Library/Application Support/com.mitchellh.ghostty/config" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CONFIG_FILE
can also live in $XDG_CONFIG/ghostty
and $HOME/.config/ghostty
so we should check to see where the ghostty config exists before continuing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could probably do something along the lines of checking where the file exists first and then setting CONFIG_FILE
to the matched path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$XDG_CONFIG/ghostty
Isn't that supposed to be $XDG_CONFIG_HOME/ghostty
?
if ! command -v ffmpeg &> /dev/null; then | ||
echo "ffmpeg is required but not installed. Please install it with 'brew install ffmpeg'" | ||
exit 1 | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also have a check to make sure one of the files exist and if it doesn't, instead of moving config
to config.backup
, we'd simply create a config
and then delete it following the process. (this way users who have a no-config setup for ghostty don't have a ton of errors popping up)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or use open -na Ghostty.app --args --config-default-files=false --custom-shader=/some/path
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also the fact that it shows your code for a second probably isn't intended haha - feel free to update it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perfect but you can add something special to be more interactive
This script generates gifs of each shader in the repo and then shows those gifs in the README.
I think the GIFs could be higher resolution, but then the file size can be a bit much. I experimented a bit with videos but it seems GitHub doesn't allow embedding video into the README.